function run(req,res){
    var userBean = require('../../been/user').userBean;
    var db = require('../../db').db;
    var userModel = db.model('users',userBean);
    var params = {};
    params['userId'] = req.query.id;
    params['pwd'] = req.query.pwd;
    params['isDel'] = 0;
    params['type'] = req.query.type>0?req.query.type:1;
    params['msg'] = '';
    params['name'] = req.query.name;
    params['male'] = req.query.male?req.query.male:2;
    params['age'] = req.query.age?req.query.age:0;
    params['create'] = new Date().getTime();
    params['update'] = new Date().getTime();
    // insert
    userModel.find({'userId':req.query.id},function(err,results){
        if(err){
            res.send(err);
        }else if(results.length > 0){
            res.send('草，被注册了');
        }else{
            var userDB = new userModel(params);
            userDB.save(function(err){
                if(err){
                    res.send(err);
                }else{
                    res.send('成功插入数据');
                }
            });
        }
    })

}
exports.run = run;